package com.ouc.entity;

import lombok.Data;

/**
 * @Name: Circle
 * @Description: 圆形
 * @Author: Mr.Tong
 */
@Data
public class Circle extends Shape {
    //半径
    private Double radius;
    @Override
    public Double perimeter() {
        return Math.PI * radius * 2.0;
    }
    @Override
    public Double area() {
        return Math.PI * radius * radius;
    }

    @Override
    public Integer unitAreaPrice() {
        return ShapeType.UNITAREAPRICE.get(1);
    }
}
